Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Better autofocus, to make it work on mobile somehow #258

Open
wants to merge 1 commit into
base: release/v0.7.0
Choose a base branch
from

Conversation

develoopeer
Copy link

@develoopeer develoopeer commented Nov 15, 2024

Whats the point

As mentioned in issue #208, autofocus attribute on search bar do not works on mobile devices. This is due to security restrictions of Android/IOS devices. Keyboard cant be toggled without any kind of user interaction.
Here's what people from react-select who have encountered the same problem say about it

I don't think there is any workaround in this case, to make this functionality works.
But this PR, adding border animation on search bar to make them works like in desktop version. Without this change, user can`t even figure out, that autofocus flag is enabled, because borders are blurred.

@svilenmarkov
Copy link
Member

Thanks for contributing!

I tried both the current implementation as well as this one and the behavior appears to be the same - the field gets focused and receives the colored border, but as you mentioned, the keyboard does not appear due to security restrictions. Is the field not getting focused for you at all with just the autofocus attribute?

@develoopeer
Copy link
Author

develoopeer commented Nov 16, 2024

Yes the field wasn't getting any focus at all, but today i tried to reproduce this, and eventually nothing happening.
I am using Mobile version of Chrome v130.0.6. I do not know why this behavior no longer appears, maybe i was doing something wrong.
If this case was just false positive, there is no need to merge this PR, because it will just make things more complicated. Sorry for bothering

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants